import Vue from 'vue'
import App from './App.vue'
import router from './router'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import store from "./store" // 引入vuex

import umlib from './umlib' // 全部工具方法
Vue.use(umlib)

Vue.use(ElementUI, { locale })

// 注册全局组件
import Buttons from "@/components/buttons" // 按钮组件
Vue.component("Buttons",Buttons)

import PublicImage from "@/components/publicImage" // 图片组件
Vue.component("PublicImage",PublicImage)

import NewBanner from "@/components/newBanner" // 图片组件
Vue.component("NewBanner",NewBanner)

import Container from "@/components/container" // 容器组件
Vue.component("Container",Container)

import ContainerTitle from "@/components/containerTitle" // 大容器标题
Vue.component("ContainerTitle",ContainerTitle)

// 图片懒加载相关
import Img from "@/assets/image/finance/product_dj.png" // 引入默认图片
import progressive from 'progressive-image/dist/vue'; // 渐进式
Vue.use(progressive, {
  removePreview: true,
  scale: true
})
import VueLazyLoad from 'vue-lazyload'; // 懒加载
Vue.use(VueLazyLoad, {
	// error:'../static/assets/image/finance/product_dj.png', // 加载错误的图片
	loading: Img // 加载时的图片
});

// 图片预览插件
import 'viewerjs/dist/viewer.css'
import VueViewer from 'v-viewer'
Vue.use(VueViewer)
// 引入第三方视频插件
import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css'
import 'video.js/dist/video-js.css'
import "babel-polyfill"
Vue.use(VideoPlayer)
import 'swiper/dist/css/swiper.min.css';

import '@/assets/styles/index.scss'

Vue.config.productionTip = false

// 解决chrome的控制台重复出现[WDS] Disconnected!的警告
if (module.hot) {
  module.hot.accept();
}


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
